package com.hmy.finance.service.receipt.rdto.offset;

import com.hmy.finance.api.common.enums.receipt.OffsetStatusEnum;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * Manual Offset Result Data Transfer Object
 *
 * @author songkf
 */
@Data
public class ManualOffsetRdto implements java.io.Serializable {
    private static final long serialVersionUID = -5614111473035690398L;

    /**
     * Offset Result
     */
    private Boolean result;

    /**
     * Contract Offset Result List
     */
    private List<ContractOffsetResult> contractOffsetResultList;

    public Boolean isSuccess() {
        return result;
    }

    @Data
    public static class ContractOffsetResult implements Serializable {

        private static final long serialVersionUID = 5179997233930945251L;
        /**
         * Contactor ID
         */
        private Long contactorId;

        /**
         * Contract ID
         */
        private Long contractId;

        /**
         * Actual Offset Amount
         */
        private BigDecimal actualOffsetAmount;

        /**
         * Offset Status
         */
        private OffsetStatusEnum offsetStatus;
    }
}
